package top.haijunit.common.response.advice;

import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter;
import org.springframework.http.converter.json.AbstractJsonHttpMessageConverter;

/**
 * @author zhanghaijun
 * @version 1.0
 * @date 2024/6/6 17:47
 * @description [一句话描述该类的功能]
 */
public class AdviceSupport {

    public static boolean isJsonHttpMessageConverter(Class<? extends HttpMessageConverter<?>> clazz) {
        return AbstractJsonHttpMessageConverter.class.isAssignableFrom(clazz)
                || AbstractJackson2HttpMessageConverter.class.isAssignableFrom(clazz);
    }
}
